import request from '../networks/request';
// 添加问题
export const insertIssue = (data) => {
    return request({
        url: '/issue/add',
        method: 'post', 
        data:data , 
    });
};
// 获取所有的问题
export const getIssue = (data) => {
    return request({
        url: '/issue/findall',
        method: 'get', 
        params:data , 
    });
};


//问题详情（iid,uid）
export const findDeatils = (data) => {
    return request({
        url: '/issue/findbyiid',
        method: 'get', 
        params:data , 
    });
};

// 发布的问题
export const findbyuid = (data) => {
    return request({
        url: '/issue/findbyuid',
        method: 'get',
        params:data ,
    });
};

//修改点赞状态
export const updateissueLike_num = (data) => {
    return request({
        url: '/praise/updatelike_num',
        method: 'put',
        data:data , 
    });
};

//修改收藏状态
export const updateissueContention_num = (data) => {
    return request({
        url: '/issue/updatecollection_num',
        method: 'put', 
        data:data , 
    });
};

// 增加问题浏览量
export const issueBrowseUp = (data) => {
    return request({
        url: '/issue/browse/up',
        method: 'put',
        data
    });
}
